import { httpPost } from '@/util/http'

class User {
  login(data) {
    return httpPost('/login', data)
  }
  logout(data) {
    return httpPost('/logout', data)
  }
  updatePassword(data) {
    return httpPost('/user/update/password', data)
  }
}

class UserInfo {
  get(data) {
    return httpPost('/userinfo/get', data)
  }
  put(data) {
    return httpPost('/userinfo/put', data)
  }
}

export const user = new User()
export const userInfo = new UserInfo()
